package com.d0312;

public class AonymousInnerClass {
    private String name="Jerry";
    private int age=24;
    /*House house=new House() {
        @Override
        public void show() {
            System.out.println(name + "\t" + age);
        }
    };*/
    IFoo iFoo=()-> System.out.println(name + "\t" + age);

    public static void main(String[] args) {
        AonymousInnerClass al=new AonymousInnerClass();
        al.iFoo.display();
    }

}
@FunctionalInterface//判断是否只有一个抽象方法
interface IFoo{
    public void display();
    //int getResult();

}
abstract class House{
    public abstract void show();
}